﻿using System;
using System.Collections.Generic;
using System.Text;

namespace CommandPattern.Devices
{
    public class AirConditioner
    {
        private int temperature;//温度
        public AirConditioner(int temperature)
        {
            this.temperature = temperature;
        }
        public void Open()
        {
            Console.WriteLine("温度{0}", temperature);
            Console.WriteLine("打开空调");
        }
        public void Close()
        {
            Console.WriteLine("关闭空调");
        }
        public void Settemp(int value)
        {
            temperature = value;
        }
    }
}
